Release 10.1A: OpenEdge Application Server:
Developing AppServer Applications
Cancelling asynchronous requests
You can cancel all asynchronous requests that are executing or pending on behalf of the client on a particular AppServer by executing the
CANCEL-REQUESTS( )method on the server object handle. This method raises theSTOPcondition in the context of the asynchronous procedure currently executing and causes results to be returned for any pending asynchronous requests, as described in the following paragraph.The associated event procedures execute for all cancelled requests the next time the client blocks for I/O or executes the
PROCESSEVENTSstatement. Each event procedure receives the following results, depending on the final state of its corresponding asynchronous request:
- Any request that is completed at the time of cancellation but whose event procedure has not yet run — The event procedure receives all input parameters passed from the request, and the
COMPLETEattribute on the asynchronous request handle (SELF) is set toTRUE. This is the same result as a normal asynchronous request completion.- The request that is executing and that is stopped in response to the
CANCEL-REQUESTS( )method — The event procedure input parameters are set to Unknown value (?), and theCOMPLETEattribute on the asynchronous request handle (SELF) is set toTRUE. If the stopped request does not handle theSTOPcondition raised by theCANCEL-REQUESTS( )method, theSTOPattribute on the asynchronous request handle (SELF) is also set toTRUE. This is the same result as if theSTOPcondition were raised on the AppServer agent running the request.Note: If you disconnect an AppServer using the- Any request that is removed from the send queue prior to its execution — The event procedure input parameters are set to the Unknown value (
?) (or unchanged forTEMP-TABLEparameters), and theCANCELLEDattribute on the asynchronous request handle (SELF) is set toTRUE. This result can only occur for a request that is cancelled while waiting for execution.DISCONNECT( )method, this also cancels all asynchronous requests still running or pending on the AppServer. For more information, see the "Disconnecting from an AppServer instance" section.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |